<%@ Page Language="C#" AutoEventWireup="true" Codebehind="AdminApprove.aspx.cs" Inherits="LoanApprovalClient.AdminApprove" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>SWINDLES BANK MORTGAGE CALCULATOR</title>
    <link href="SwindlesStyles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style3
        {
            width: 103px;
        }
        .style4
        { 
        }
        .style5
        {
            width: 158px;
        }
        .style6
        {
            font-size: x-small;
        }
        .col1
        {
            width: 150px;
        }
        .col2
        {
            padding-right: 10px;
        }
        .col3
        {
            width: 150px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div id="divUserNotLoggedIn" runat="server">
            Your session has expired or you have not logged in.
            <a href="AdminLogin.aspx" >Return to the Login screen.</a>
        </div>
        <div id="divMainData" runat="server">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="34">
                        &nbsp;
                    </td>
                    <td align="left">
                        <table width="560" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class="permission" colspan="3">
                                    <p>
                                        Swindles Bank Web based automated loan application system v1.0.</p>
                                </td>
                            </tr>
                            <tr>
                                <td width="560" valign="top">
                                        <table width="560" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td height="87" class="header">
                                                    <img src="header.gif" alt="$windles bank" width="335" height="57" />
                                                </td>
                                            </tr>
                                            <tr>
                                             <td>
                                                 <asp:Label ID="lblInfoMessage" runat="server"></asp:Label>
                                                 <asp:RangeValidator   ID="RangeValidator1" runat="server" ErrorMessage="Credit must be a decimal format." ControlToValidate="txtCreditRating" Type="Double"></asp:RangeValidator  >
                                                 <asp:RequiredFieldValidator  ID="RequiredFieldValidator1" runat="server" ErrorMessage="Credit is required." ControlToValidate="txtCreditRating" ></asp:RequiredFieldValidator   >
                                             </td>
                                            </tr>
                                            <tr>
                                                <td class="title">
                                                    <h2>
                                                        Loan Applications</h2>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:DataGrid Enabled="true" ID="grdApps"  runat="server"  OnItemCommand="grdApps_ItemCommand" EnableViewState="true">
                                                                    <Columns> 
                                                                        <asp:ButtonColumn ButtonType="PushButton" Text="View" CommandName="btnAppProcess" ></asp:ButtonColumn>
                                                                        <asp:TemplateColumn >
                                                                            <ItemTemplate>
                                                                                <asp:HiddenField ID="hidLoanAppID" runat="server" />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:BoundColumn DataField="ApplicationID" HeaderText="Application ID" ></asp:BoundColumn>
                                                                        <asp:BoundColumn DataField="CustomerID" HeaderText="Internal Customer ID" ></asp:BoundColumn>
                                                                        <asp:BoundColumn DataField="StatusUpdateDate" HeaderText="Last Status Update" ></asp:BoundColumn>
                                                                        <asp:BoundColumn DataField="QuoteID" HeaderText="Quote ID" ></asp:BoundColumn>
                                                                    </Columns>
                                                                </asp:DataGrid>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                   </td>
                                                   </tr>
                                        </table>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" class="footer" colspan="3">
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <!-- Loan app details -->
            <table width="" border="0" cellspacing="0" cellpadding="2" class="post">
                <tr>
                    <td class="title" colspan="5">
                        <h2>
                            Loan Application Details</h2>
                    </td>
                    <td class="title">
                        &nbsp;
                    </td>
                </tr>
                
                <tr>
                    <td class="col1"><p>Application ID</p></td>
                    <td class="col2"><asp:TextBox ID="txtApplicationID" runat="server" ></asp:TextBox></td>
                    <td class="col3">Annual Income</td>
                    <td class="col4"><asp:TextBox ID="txtAnnualIncome" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="col1"><p>Application Status</p></td>
                    <td class="col2"><asp:TextBox ID="txtApplicationStatus" runat="server" ></asp:TextBox></td>
                    <td class="col3">AssetValue</td>
                    <td class="col4"><asp:TextBox ID="txtAssetValue" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="col1"><p>Status Updated</p></td>
                    <td class="col2"><asp:TextBox ID="txtStatusUpdateDate" runat="server" ></asp:TextBox></td>
                    <td class="col3">Annual Expense</td>
                    <td class="col4"><asp:TextBox ID="txtAnnualExpense" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="col1"><p>Status Updated by UserID</p></td>
                    <td class="col2"><asp:TextBox ID="txtStatusUpdateUserID" runat="server" ></asp:TextBox></td>
                    <td class="col3">&nbsp;</td>
                    <td class="col4">&nbsp;</td>
                </tr>
                <tr>
                    <td class="col1"><p>Comments</p></td>
                    <td class="col2"><asp:TextBox ID="txtComments" runat="server" ></asp:TextBox></td>
                    <td class="col3">&nbsp;</td>
                    <td class="col4">&nbsp;</td>
                </tr>

<%--                <tr>
                    <td class="col1"><p>___LABEL____</p></td>
                    <td class="col2"><asp:TextBox ID="txt____" runat="server" ></asp:TextBox></td>
                    <td class="col3">___LABEL____</td>
                    <td class="col4"><asp:TextBox ID="txt____" runat="server" ></asp:TextBox></td>
                </tr>
--%>         
         
                <tr>
                    <td class="title2" colspan="4">Customer Details</td>
                    <td class="title2">&nbsp;</td>
                    <td class="title2">&nbsp;</td>
                </tr>
                <%--
                <CusomerID>int</CusomerID>
                <CustomerName>string</CustomerName>
                <CreditRating>int</CreditRating>
                <Reason>string</Reason>

                <CustomerNumber>string</CustomerNumber>
                <Email>string</Email>
                <Password>string</Password>
--%>
                <tr>
                    <td class="col1"><p>Cusomer ID</p></td>
                    <td class="col2"><asp:TextBox ID="txtCusomerID" runat="server" ></asp:TextBox></td>
                    <td class="col3">Customer Number</td>
                    <td class="col4"><asp:TextBox ID="txtCustomerNumber" runat="server" ></asp:TextBox></td>
                </tr>

                <tr>
                    <td class="col1"><p>Customer Name</p></td>
                    <td class="col2"><asp:TextBox ID="txtCustomerName" runat="server" ></asp:TextBox></td>
                    <td class="col3">Email</td>
                    <td class="col4"><asp:TextBox ID="txtEmail" runat="server" ></asp:TextBox></td>
                </tr>

                <tr>
                    <td class="col1"><p>Credit Rating</p></td>
                    <td class="col2"><asp:TextBox ID="txtCreditRating" runat="server"  ></asp:TextBox></td>
                    <td class="col3">Password</td>
                    <td class="col4"><asp:TextBox ID="txtPassword" runat="server" ></asp:TextBox></td>
                </tr>

                <tr>
                    <td class="col1"><p>Last Reason for Credit Change</p></td>
                    <td class="col2"><asp:TextBox ID="txtReason" runat="server" ></asp:TextBox></td>
                    <td class="col3">&nbsp;</td>
                    <td class="col4">&nbsp;</td>
                </tr>

                <tr>
                    <td class="title2" colspan="4">Quoted Property</td>
                    <td class="title2">&nbsp;</td>
                    <td class="title2">&nbsp;</td>
                </tr>
<%--
                
                    
                    <PrptyAddressLine1>string</PrptyAddressLine1>
                    <PrptyAddressLine2>string</PrptyAddressLine2>
                    <PrptySuburb>string</PrptySuburb>
                    <PrptyState>string</PrptyState>
                    <PrptyPostcode>int</PrptyPostcode>

                    <PrptyType>string</PrptyType>
                    <PrptySize>decimal</PrptySize>
                    <PrptyYearBuilt>int</PrptyYearBuilt>
                    <PrptyValue>decimal</PrptyValue>
                    
                    <LoanAmount>decimal</LoanAmount>
                    <LoanTerm>int</LoanTerm>
                    <LoanIntrest>decimal</LoanIntrest>
                    <LoanInsurance>string</LoanInsurance>
                    <LoanMRepayment>decimal</LoanMRepayment>
                    <QuoteDate>dateTime</QuoteDate>
--%>

                <tr>
                    <td class="col1"><p>Address Line 1</p></td>
                    <td class="col2"><asp:TextBox ID="txtPrptyAddressLine1" runat="server" ></asp:TextBox></td>
                    <td class="col3">Type</td>
                    <td class="col4"><asp:TextBox ID="txtPrptyType" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="col1"><p>Address Line 2</p></td>
                    <td class="col2"><asp:TextBox ID="txtPrptyAddressLine2" runat="server" ></asp:TextBox></td>
                    <td class="col3">Size</td>
                    <td class="col4"><asp:TextBox ID="txtPrptySize" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="col1"><p>Suburb</p></td>
                    <td class="col2"><asp:TextBox ID="txtPrptySuburb" runat="server" ></asp:TextBox></td>
                    <td class="col3">Year Built</td>
                    <td class="col4"><asp:TextBox ID="txtPrptyYearBuilt" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="col1"><p>State</p></td>
                    <td class="col2"><asp:TextBox ID="txtPrptyState" runat="server" ></asp:TextBox></td>
                    <td class="col3">Property Value</td>
                    <td class="col4"><asp:TextBox ID="txtPrptyValue" runat="server" ></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="col1"><p>Postcode</p></td>
                    <td class="col2"><asp:TextBox ID="txtPrptyPostcode" runat="server" ></asp:TextBox></td>
                    <td class="col3">&nbsp;</td>
                    <td class="col4">&nbsp;</td>
                </tr>

                <tr>
                    <td class="title2" colspan="4">Quotes</td>
                    <td class="title2">&nbsp;</td>
                    <td class="title2">&nbsp;</td>
                </tr>
                
                <!--
                    <LoanAmount>decimal</LoanAmount>
                    <LoanTerm>int</LoanTerm>
                    <LoanMRepayment>decimal</LoanMRepayment>

                    <LoanIntrest>decimal</LoanIntrest>
                    <LoanInsurance>string</LoanInsurance>
                    <QuoteDate>dateTime</QuoteDate>
-->
                
                <tr>
                    <td class="col1"><p>Loan Amount</p></td>
                    <td class="col2"><asp:TextBox ID="txtLoanAmount" runat="server" ></asp:TextBox></td>
                    <td class="col3">Loan Intrest</td>
                    <td class="col4"><asp:TextBox ID="txtLoanIntrest" runat="server" ></asp:TextBox></td>
                </tr>
                
                <tr>
                    <td class="col1"><p>Loan Term</p></td>
                    <td class="col2"><asp:TextBox ID="txtLoanTerm" runat="server" ></asp:TextBox></td>
                    <td class="col3">Loan Insurance</td>
                    <td class="col4"><asp:TextBox ID="txtLoanInsurance" runat="server" ></asp:TextBox></td>
                </tr>
                
                <tr>
                    <td class="col1"><p>Monthly Repayment</p></td>
                    <td class="col2"><asp:TextBox ID="txtLoanMRepayment" runat="server" ></asp:TextBox></td>
                    <td class="col3">Date of Quote</td>
                    <td class="col4"><asp:TextBox ID="txtQuoteDate" runat="server" ></asp:TextBox></td>
                </tr>
                                
                <tr>
                    <td class="body">
                        Officer Comments&nbsp;
                    </td>
                    <td colspan="3">
                        <textarea cols="40" name="Comments" rows="6"></textarea>
                        <asp:TextBox Rows="3" ID="txtCommentsNew" runat="server" ></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="text-align:left">
                       <asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="Credit must be a number format." ControlToValidate="txtCreditRating" Type="Integer"></asp:RangeValidator  >
                       <asp:RangeValidator ID="RangeValidator3" runat="server" ErrorMessage="Loan Amount must be a decimal format." ControlToValidate="txtLoanAmount" Type="Double"></asp:RangeValidator  >
                       <asp:RangeValidator ID="RangeValidator4" runat="server" ErrorMessage="Loan Intrest must be a decimal format." ControlToValidate="txtLoanIntrest" Type="Double"></asp:RangeValidator  >
                       <asp:RangeValidator ID="RangeValidator5" runat="server" ErrorMessage="Loan Term must be a number format." ControlToValidate="txtLoanTerm" Type="Integer"></asp:RangeValidator  >
                       <%--<asp:RangeValidator ID="RangeValidator6" runat="server" ErrorMessage="Loan Insurance must be a decimal format." ControlToValidate="txtLoanInsurance" Type="Double"></asp:RangeValidator  >--%>
                       <asp:RangeValidator ID="RangeValidator7" runat="server" ErrorMessage="Monthly Repayment must be a decimal format." ControlToValidate="txtLoanMRepayment" Type="Double"></asp:RangeValidator  >
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;
                    </td>
                    <td class="style5" colspan="2">
                        &nbsp;
                    </td>
                    <td class="style5" colspan="2">
                        <asp:Button id="btnReject" CommandName="RejectApplication" Text="Reject" CausesValidation="true" runat="server"  />
                        <asp:Button id="btnApprove" CommandName="ApproveApplication" Text="Approve" CausesValidation="true" runat="server" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td height="4" class="bottom" colspan="6">
                    </td>
                </tr>
                <tr>
                    <td class="close" colspan="6">
                    </td>
                </tr>
            </table>
            
            
        </div>
    </form>
</body>
</html>
